import React, { PureComponent } from 'react'
import Home from './pages/home'
import Profile from './pages/profile'
import { connect } from 'react-redux'
// import About from './pages/about'
// import store from './store'


export class App extends PureComponent {
  // constructor(props) {
  //   super(props)
  //   this.state = {
  //     count: store.getState().count.count
  //   }
  // }
  // componentDidMount() {
  //   store.subscribe(()=>{
  //     this.setState({
  //       count: store.getState().count.count
  //     })
  //   })
  // }
  render() {
    const { count } = this.props
    return (
      <div>
        APP Count: {count}
        <Home/>
        <Profile/>
    
      </div>
    )
  }
}
const mapStateToProps=(state)=>{
  return {
    count: state.count.count
  }
}
export default connect(mapStateToProps)(App)
